package com.hongyue.dey01;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class dey01 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress localHost = InetAddress.getLocalHost();
        System.out.println("localHost = " + localHost);
        InetAddress byName = InetAddress.getByName("192.168.67.126");
        System.out.println(byName.getHostName());
    }
}
